package com.lagou;

import com.lagou.service.HelloService;
import org.apache.dubbo.common.extension.ExtensionLoader;

import java.util.Set;

public class HelloServiceMain {

    public static void main(String[] args) {
        ExtensionLoader<HelloService> extensionLoader = ExtensionLoader.getExtensionLoader(HelloService.class);
        Set<String> supportedExtensions = extensionLoader.getSupportedExtensions();
        for (String extension : supportedExtensions) {
            HelloService helloService = extensionLoader.getExtension(extension);
            System.out.println(helloService.getClass().getName() + ":" + helloService.sayHello());
        }
    }

}
